package com.shawn.integeration.business.usermanager.controller;

import com.shawn.integeration.business.usermanager.model.dto.UserDTO;
import com.shawn.integeration.common.model.res.GenericResponse;
import com.shawn.integeration.log.annonation.Log;
import com.shawn.integeration.log.enums.BusinessType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户管理控制层
 *
 * @author: shawn
 * @Date: 2023/12/28 11:12
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @PostMapping(value = "/add")
    @Log(title = "用户管理模块", businessType = BusinessType.INSERT)
    public GenericResponse<UserDTO> addUser(@RequestBody UserDTO user) {
        // 数据库插入操作。。。
        return GenericResponse.success(user);
    }
}
